import request from '@/utils/request'

// 查询正式清单的商品列表
// export function listCosting(query) {
//   return request({
//     url: '/project/costing/list',
//     method: 'get',
//     params: query
//   })
// }


export function listCosting(query) {
  return request({
    url: '/project/costing/page',
    method: 'get',
    params: query
  })
}

//清单对比
export function listCompare(query) {
  return request({
    url: '/project/accounting/listCompare',
    method: 'get',
    params: query
  })
}


// 查询正式清单的商品详细
export function getCosting(id) {
  return request({
    url: '/project/costing/' + id,
    method: 'get'
  })
}

// 新增正式清单的商品
export function addCosting(data) {
  return request({
    url: '/project/costing',
    method: 'post',
    data: data
  })
}

// 修改正式清单的商品
export function updateCosting(data) {
  return request({
    url: '/project/costing',
    method: 'put',
    data: data
  })
}

// 删除正式清单的商品
export function delCosting(id) {
  return request({
    url: '/project/costing/' + id,
    method: 'delete'
  })
}
